package com.qzsoft.zhjd.server.modules.ludong.exp.service.impl;

import com.qzsoft.zhjd.server.modules.ludong.exp.mapper.CollectExpCuringRoomMapper;
import com.qzsoft.zhjd.server.modules.ludong.exp.service.CollectExpCuringRoomService;
import com.qzsoft.zhjd.server.modules.ludong.exp.entity.CollectExpCuringRoomEntity;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service("expCuringRoomService")
public class CollectExpCuringRoomServiceImpl extends ServiceImpl<CollectExpCuringRoomMapper, CollectExpCuringRoomEntity> implements CollectExpCuringRoomService {


    /**
     * 功能描述: 先删除后添加
     * @param collectExpCuringRoomEntity 实体
     * @return : void
     * @author : liugf
     * @date : 2020/6/10 20:35
     */
    @Transactional(rollbackFor = Exception.class)
    @Override
    public void insertAndRemoveData(CollectExpCuringRoomEntity collectExpCuringRoomEntity) {
        removeById(collectExpCuringRoomEntity.getId());
        save(collectExpCuringRoomEntity);
    }

}
